<?php
class editorModel extends baseModel{

    public function get_editor($id){
        $html="
        <script>
        var editor_".$id.";
        Do.ready('base','editor','dialog', function() {

            KindEditor.lang({
                duxupload : '批量上传文件'
            });

            KindEditor.plugin('duxupload', function(K) {
                var self = this, name = 'duxupload';
                self.clickToolbar(name, function() {
                    urldialog({
                        title:'批量上传文件',
                        url:'".url('editor/upload/editor_upload',array('id'=>$id))."',
                        width:615,
                        height:410
                    });
                });
            });
            editor_".$id." = KindEditor.create(
                '#".$id."', 
                    {
                        allowFileManager : false,
                        allowImageUpload : false,
                        allowFileUpload:false,
                        allowMediaUpload:false,
                        filterMode : false,
                        allowFlashUpload :false,
                        afterBlur: function(){this.sync();},
                        items : ['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', 
        '|','image', 'flash', 'media', '|', 'duxupload', '|','table', 'hr',  'baidumap', 'pagebreak',
        'anchor', 'link', 'unlink', '|', 'about']
                    });   
        });
        </script>
        ";
        return $html;
    }



	
}